<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>菜单管理</title>
    <!-- 新 Bootstrap4 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">


    <link rel="stylesheet" href="../../../css/bootstrap-table.min.css">

    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
    <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>

    <!-- bootstrap.bundle.min.js 用于弹窗、提示、下拉菜单，包含了 popper.min.js -->
    <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>

    <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
    <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>


    <script src="../../../js/bootstrap-table.min.js"></script>

    <script src="../../../js/bootstrap-table-zh-CN.min.js"></script>
</head>
<body>

    <div>
        <div class="form-inline" style="display: flex;justify-content: center">
            <label for="ss_menunames">请输入菜单名称：</label>
            <input type="text" class="form-control" id="ss_menunames">
            <button class="btn btn-primary" id="ss_btn">搜索</button>
        </div>
    </div>

    <div>
        <table id="menus_tab">

        </table>
    </div>

<script>
    $(function () {
        $("#menus_tab").bootstrapTable({
            method: "post",
            contentType: "application/x-www-form-urlencoded;charset=utf-8",
            url: "/sys/queryallmenuByuserid",
            striped: true,
            pageNumber: 1,
            pagination: true,
            sidePagination: "server",
            pageSize: 3,
            pageList: [3, 5, 8, 10],
            queryParams: function (parms) {
                return {
                    pageNumber: (parms.offset / parms.limit) + 1,
                    pageSize: parms.limit,
                    menunames:$("#ss_menunames").val()
                }
            },
            columns: [

                {
                    title: "选择", field: "check", align: "center",
                    formatter: function (value, row, index) {
                        var input1 = "<input class='form-control' value='" + row.id + "' type='checkbox'>"
                        return input1;
                    }
                },
                {title: "序号", field: "id", align: "center"},
                {title: "菜单名称", field: "name", align: "center"},
                {title: "菜单说明", field: "tip", align: "center"},
            ],
        })
        $("#ss_btn").click(function () {
            $("#menus_tab").bootstrapTable("refresh");
        })
    })
</script>
</body>
</html>